package Exercise;

import java.util.Scanner;

public class Test1ComprehensivePassword1 {
    public static void recordPassword(int[] arr) {
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = sc.nextInt();
        }
    }

    public static int[] comperhension(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (arr[i] + 5) % 10;
        }
        return arr;
    }

    public static int[] uncomperhension(int[] arr) {
        return comperhension(arr);
    }

    public static void main(String[] args) {
        int[] arr1 = new int[6];
        recordPassword(arr1);
        System.out.print("原密码是");
        for (int k : arr1) {
            System.out.print(k);
        }
        System.out.println();
        int[] arr2 = comperhension(arr1);
        System.out.print("加密密码是: ");
        for (int j : arr2) {
            System.out.print(j);
        }
        System.out.println();
        int[] arr3 = uncomperhension(arr1);
        System.out.print("解码密码是");
        for (int i : arr3) {
            System.out.print(i);
        }
    }
}
